package ${package.Entity};

<#list table.importPackages as pkg>
import ${pkg};
</#list>
import com.baomidou.mybatisplus.annotation.*;
<#if swagger2>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
<#if entityLombokModel>
import lombok.Data;
</#if>
/**
* 业精于勤荒于嬉，行成于思毁于随！
* @author ${author}
* @since ${date}
*/
<#if entityLombokModel>
@Data
</#if>
@TableName("${table.name}")
<#if swagger2>
@ApiModel(value="${entity}对象", description="${table.comment!}")
</#if>
public class ${entity} implements Serializable {

<#if entitySerialVersionUID>
    private static final long serialVersionUID = 1L;
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyName="${field.propertyName}"/>
    </#if>

    <#if field.comment!?length gt 0>
        <#if swagger2>
    @ApiModelProperty(value = "${field.comment}")
        <#else>
            /**
            * ${field.comment}
            */
        </#if>
    </#if>
    <#if field.keyFlag>
    <#-- 主键 -->
    @TableId("${field.name}")
    <#elseif field.name=='create_time_' || field.name=='creatar_'>
    <#-- -----   创建时间   ----->
    @TableField(value="${field.name}",fill = FieldFill.INSERT)
    <#elseif field.name=='update_time_' || field.name=='updataer_'>
    <#-- -----   创建时间   ----->
    @TableField(value="${field.name}",fill = FieldFill.INSERT_UPDATE)
    <#-- 普通字段 -->
    <#else>
    <#-- -----   存在字段填充设置   ----->
    @TableField("${field.name}")
    </#if>
    private ${field.propertyType} ${field.propertyName};
</#list>


    @Override
    public String toString() {
    return "${entity}{" +
    <#list table.fields as field>
        "${field.propertyName}=" + ${field.propertyName}+ '\'' +
    </#list>
    '}';
    }

}
